<?php

defined('JOC') or die;
/* -------------------------------------------------------|
 * page_header_link_model Class.                                        +
 * ------------------------------------------------------|
 * Description :                                         +
 *       +
 * ------------------------------------------------------|
 * @author : javier.camelis                                     |
 * ------------------------------------------------------|
 */

class Page_header_link_model extends Model {
  /*-------------------------------------------------------|
   * DataBase table name.                                  +
   * ------------------------------------------------------|
   * Description :                                         +
   * The name of the table that this model will control    +
   * ------------------------------------------------------|
   */
  protected $_table_name  = 'page_header_link' ;
  /*-------------------------------------------------------|
   * Primary Key.                                          +
   * ------------------------------------------------------|
   * Description :                                         +
   * Primary Key DataBase table name                       +
   * ------------------------------------------------------|
   */
  protected $_pk_name     = 'page_header_link_id' ;
  
  function Select_by_page_id($page_id = 0)
  {
    if($page_id)
    {
      $sql = " SELECT * FROM {prefix}{$this->_table_name} WHERE page_id = {$page_id} ORDER BY `order` ASC ; " ;
      $this->_last_result = $this->db()->query($sql) ;
      return $this ;
    }
  }
}

/*
 * ---------------------------------------------------------+
 * End of file page_header_link_model.class.php                         |
 * ---------------------------------------------------------+
 * located at page_header_link_model.class.php               |
 * ---------------------------------------------------------+
*/